package org.snare.alumni.modules.admin.org.service.api;

import com.baomidou.mybatisplus.core.metadata.IPage;
import org.snare.alumni.modules.admin.org.entity.OrgEntity;
import org.snare.spider.common.base.Limit;
import org.snare.spider.service.annotation.ApiGet;
import org.snare.spider.service.annotation.ApiPost;
import org.snare.spider.service.annotation.ApiService;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

import javax.validation.Valid;
import java.util.List;


@ApiService(mapping = "/alumni/org", desc = "系统管理-校友组织")
public interface OrgService {

    @ApiGet(mapping = {"/page"}, desc = "分页")
    IPage<OrgEntity> page(String title, String type, Limit limit);

    @ApiGet(mapping = {"/list"}, desc = "分页")
    List<OrgEntity> list(String type);

    @ApiPost(mapping = {"/add"}, desc = "新增")
    void add(@RequestBody @Valid OrgEntity params);

    @ApiPost(mapping = {"/edit"}, desc = "编辑")
    void edit(@RequestBody @Valid OrgEntity params);

    @ApiGet(mapping = {"/delete"}, desc = "删除")
    void delete(@RequestParam String id);

    @ApiPost(mapping = {"/detail"}, desc = "详情")
    OrgEntity detail(String id);

}
